<div id="J_login_question_set_wrap" tabindex="0" class="core_pop_wrap">
		<div class="core_pop">
			<div class="pop_login">
				<div class="pop_top J_drag_handle">
					<a href="" class="pop_close" id="J_login_question_close">关闭</a>
					<strong>您必须设置安全问题</strong>
				</div>
				<form id="J_head_question_set_form" action="{@url:u/login/dosetting}" method="post" >
				<input type="hidden" name="_statu" value="{$_statu}">
				<input type="hidden" name="v" value="{$v}" />
				<div class="pop_cont">
					<div id="J_login_question_set_tips" style="display:none;" class="tips"></div>
					<dl class="cc">
						<dt style="width:75px;">安全问题：</dt>
						<dd><select class="select_4" name="question" id="J_qustion_select">
<!--#foreach ($safeCheckList as $key => $value) {#-->
						<option value='{$key}'>{$value}</option>
<!--#}#-->
						<!--<option value="-2">自定义安全问题</option> -->
						</select></dd>
					</dl>
					<dl class="cc" style="display:none" id="J_myqustion_dl">
						<dt style="width:75px;">自定义问题：</dt>
						<dd><input type="text" name="myquestion" value="" class="input length_4"></dd>
					</dl>
					<dl class="cc">
						<dt style="width:75px;">你的答案：</dt>
						<dd><input type="text" class="input length_4" name="answer"></dd>
					</dl>
<!--#if ($verify) {#-->
					<dl class="cc dl_cd">
						<dt style="width:75px;">验证码：</dt>
						<dd>
							<input id="J_head_login_code" type="text" class="input length_4 mb5" name="code">
							<div id="J_verify_code"></div>
						</dd>
					</dl>
<!--#}#-->
				</div>
				<div class="pop_bottom">
					<button type="submit" class="btn btn_submit">Đăng nhập</button>
				</div>
				</form>
			</div>
		</div>
	</div>
<script type="text/javascript">
$(function(){
	
	var login_question_set_wrap = $('#J_login_question_set_wrap'),
		login_question_set_tips = $('#J_login_question_set_tips');
	
	//拖动组件
	login_question_set_wrap.draggable( { handle : '.J_drag_handle'} );

	//自定义问题
	var myqustion_dl = $('#J_myqustion_dl');
	$('#J_qustion_select').on('change', function(){
		if(this.value == '-4') {
			myqustion_dl.show();
		}else{
			myqustion_dl.hide();
		}
	});
	
	//关闭
	$('#J_login_question_close').on('click', function(e){
		e.preventDefault();
		login_question_set_wrap.remove();
		$('#J_sidebar_login').focus();
	});
	
	//提交
	$('#J_head_question_set_form').ajaxForm({
		dataType : 'json',
		//beforeSubmit : function (arr, $form, options) {},
		success : function (data, statusText, xhr, $form) {
			if(data.state === 'success') {
				Wind.Util.resultTip({
					msg : '设置成功 即将跳转',
					callback : function(){
						window.location.href = data.referer;
					}
				});
			}else{
				login_question_set_tips.html('<div class="tips_icon_error">'+ data.message +'</div>').show();
			}
		}
	});
	
});
</script>